package graphix;

import java.awt.Image;
import javax.swing.ImageIcon;

/**
 * @author duncan
 */
public class Entity
{
    int x, y;
    Image img;

    /**
     * Entity constructor.
     */
    public Entity()
    {
	this (0, 0, null);
    }

    /**
     * Entity constructor.
     *
     * @param x The x coordinate on the DrawPane.
     * @param y The y coordinate on the DrawPane.
     */
    public Entity(int x, int y)
    {
	this (x, y, null);
    }

    /**
     * Entity constructor.
     *
     * @param img The Image to display on the DrawPane.
     */
    public Entity(Image img)
    {
	this (0, 0, img);
    }

    /**
     * Entity constructor.
     *
     * @param img The path to an Image to display on the DrawPane.
     */
    public Entity(String img)
    {
	this (img, 0, 0);
    }

    /**
     * Entity constructor.
     *
     * @param x The x coordinate on the DrawPane.
     * @param y The y coordinate on the DrawPane.
     * @param img The Image to display on the DrawPane.
     */
    public Entity(String img, int x, int y)
    {
	this (x, y, new ImageIcon(img).getImage());
    }

    /**
     * Entity constructor.
     *
     * @param x The x coordinate on the DrawPane.
     * @param y The y coordinate on the DrawPane.
     * @param img The Image to display on the DrawPane.
     */
    public Entity(int x, int y, Image img)
    {
	this.x	    = x;
	this.y	    = y;
	this.img    = img;
    }
}